﻿<%@ Page Language="C#" MasterPageFile="~/System/MasterPageTra.master" AutoEventWireup="true"
    CodeFile="Tra_BidPlanList.aspx.cs" Inherits="Bidder_Tra_BidPlanList" Title="Untitled Page" %>

<%@ Register Src="../System/DbPageFlip.ascx" TagName="DbPageFlip" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<script language="javascript" src="../Common/Departmentback.js" type="text/javascript"></script>
    <script language="javascript" src="../common/javascript/calendar.js" type="text/javascript"></script>
 
    <script language="javascript">

        function myrefresh() {
            // window.location.reload();
            window.location = window.location;
        }
        setTimeout('myrefresh()', 60000); //指定30秒刷新一次

        function SelectAll() {
            var i;
            var a = document.getElementsByName('chk');
            for (i = 0; i < a.length; i++) {
                a[i].checked = true;
            }
        }
        function ClearAll() {
            var i;
            var a = document.getElementsByName('chk');

            for (i = 0; i < a.length; i++) {
                a[i].checked = false;
            }
        }
        function CheckOthers() {
            var i;
            var a = document.getElementsByName('chk');

            for (i = 0; i < a.length; i++) {

                if (a[i].checked != true) {
                    a[i].checked = true;
                }
                else {
                    a[i].checked = false;
                }
            }

        }
       
    </script>

    <script language="javascript" type="text/javascript">
        function checkValue(qr) {
            isCheck = true;
            checknum = 0;

            objChk = document.getElementsByName("chk");
            if (typeof (objChk.length) != "undefined") {

                for (i = 0; i < objChk.length; i++) {

                    if (objChk[i].checked) {
                        checknum++;
                        objChk_value = objChk[i].value;
                        objBatchNum_value = document.getElementById("batchnum" + objChk_value).value;
                        objvalidityDate_value = document.getElementById("validityDate" + objChk_value).value;
                        if (objBatchNum_value == "" || objvalidityDate_value == "") {
                            isCheck = false;
                            alert("药品批号,药品有效期不能为空!");
                            break;
                        }

                    }
                }
            } else {
                if (objChk.checked) {
                    objChk_value = objChk.value;
                    objBatchNum_value = document.getElementById("batchnum" + objChk_value).value;
                    objvalidityDate_value = document.getElementById("validityDate" + objChk_value).value;


                    if (objBatchNum_value == "" || objvalidityDate_value == "") {
                        isCheck = false;
                        alert("药品批号,药品有效期不能为空!");
                    }
                    checknum++;
                }
            }

            if (checknum == 0) {
                isCheck = false;
                if (qr == 1)
                    alert("请选择配送药品!");
                else
                    alert('请选择无法配送药品');
            }
            return isCheck;
        }

        //显示弹出窗体

        function show(buldtime, statime, endtime) {

            document.getElementById("td1").innerHTML = "建单时间：" + buldtime;

            document.getElementById("td2").innerHTML = "开始时间：" + statime;

            document.getElementById("td3").innerHTML = "结束时间：" + endtime;

            //获得鼠标的x轴的坐标 

            x = event.clientX + document.body.scrollLeft;

            //获得鼠标的y轴的坐标 

            y = event.clientY + document.body.scrollTop + 20;

            //            //显示弹出窗体 

            popup.style.display = "block";

            //            //配置窗体的x,y轴的坐标

            popup.style.left = x

            popup.style.top = y;

        }

        //隐藏弹出窗体 

        function hide() {

            //隐藏窗体

            popup.style.display = "none";

        } 

    </script>

    <style type="text/css">
        .transparent
        {
            filter: alpha(opacity=85);
            border-top: indianred 1px solid;
            border-right: indianred 1px solid;
            border-left: indianred 1px solid;
            border-bottom: indianred 1px solid;
            position: absolute;
            background-color: infobackground;
            display: none;
        }
        .style4
        {
            height: 30px;
            width: 229px;
        }
        .style5
        {
            width: 229px;
        }
        .style6
        {
            height: 28px;
            width: 229px;
        }
        .style10
        {
            height: 30px;
            width: 143px;
        }
        .style11
        {
            width: 143px;
        }
        .style12
        {
            height: 28px;
            width: 143px;
        }
        .style13
        {
            height: 30px;
            width: 153px;
        }
        .style14
        {
            width: 153px;
        }
        .style15
        {
            height: 28px;
            width: 153px;
        }
        .style16
        {
            height: 30px;
            width: 200px;
        }
        .style17
        {
            width: 200px;
        }
        .style18
        {
            height: 28px;
            width: 200px;
        }
    </style>
    <div>
        <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
                <td style="width: 4px">
                    <img src="../images/intro_left.gif" width="4" height="34">
                </td>
                <td class="intro_wordbg">
                    采购药品确认
                </td>
                <td background="../images/intro_bg.gif">
                    <img src="../images/intro_right.jpg" width="118" height="34">
                </td>
            </tr>
        </table>
        <table id="tabData" width="98%" border="1" align="center" cellpadding="2" cellspacing="1">
            <tr>
                <td align="right" class="style13">
                    &nbsp;通用名：
                </td>
                <td class="style10">
                    <asp:TextBox ID="txtProductName" runat="server" InvertedComma="通用名" Width="125px"></asp:TextBox>
                </td>
                <td align="right" class="style16">
                    通用名：
                </td>
                <td class="style4">
                    <asp:TextBox ID="TextBox1" runat="server" InvertedComma="通用名" Width="125px"></asp:TextBox>(精确)
                </td>
                <td align="right" style="height: 30px">
                    &nbsp;
                </td>
                <td style="height: 30px">
                    &nbsp;&nbsp;
                </td>
            </tr>
            <tr>
                <td align="right" class="style14">
                    规格：
                </td>
                <td class="style11">
                    <asp:TextBox ID="txtOutlook" runat="server" InvertedComma="规 格" Width="125px"></asp:TextBox>
                </td>
                <td align="right" class="style17">
                    剂型：
                </td>
                <td class="style5">
                    <asp:TextBox ID="txtMedicinemodel" runat="server" InvertedComma="剂 型" Width="125px"></asp:TextBox>
                </td>
                <td align="right">
                    供求关系：
                </td>
                <td>
                    <asp:DropDownList ID="listSN" runat="server" Width="125px">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td align="right" class="style14">
                    商品流水号：
                </td>
                <td class="style11">
                    <asp:TextBox ID="txtGoodsId" runat="server" InvertedComma="流水号" NumericOnly="流水号"
                        Width="125px"></asp:TextBox>
                </td>
                <td align="right" class="style17">
                    商品名：
                </td>
                <td class="style5">
                    <asp:TextBox ID="txtGoodsName" runat="server" InvertedComma="商品名" Width="125px"></asp:TextBox>
                </td>
                <td align="right">
                    处理状态：
                </td>
                <td>
                    <asp:DropDownList ID="listDealStatus" runat="server" Width="125px">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td align="right" class="style15">
                    生产企业：
                </td>
                <td class="style12">
                    <asp:TextBox ID="txtCompanyNameSC" runat="server" InvertedComma="生产企业" Width="125px"></asp:TextBox>&nbsp;
                </td>
                <td align="right" class="style18">
                    生产企业注册号：
                </td>
                <td class="style6">
                    <asp:TextBox ID="txtUserCodeSC" runat="server" InvertedComma="企业编码" Width="125px"></asp:TextBox>
                </td>
                <td align="right">
                    采购单号：
                </td>
                <td>
                    <asp:TextBox ID="txtBuyPlanId" runat="server" NumericOnly="采购单号" Width="125px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="right" class="style15">
                    医院名称：
                </td>
                <td class="style12">
                    <asp:TextBox ID="TextHospital" runat="server" Width="124px"></asp:TextBox>
                </td>
                <td align="right" class="style18">
                    医院注册号：
                </td>
                <td class="style6">
                    <asp:TextBox ID="TextHospitalcode" runat="server" Width="126px"></asp:TextBox>
                </td>
                <td align="right">
                    <asp:Button ID="btnPrint" runat="server" Text="打 印" CssClass="button_bg" OnClientClick="javascript:return CheckForm();"
                        Width="61px" OnClick="btnPrint_Click" />
                </td>
                <td>
                    <asp:Button ID="Button5" runat="server" Text="查 询" CssClass="button_bg" OnClientClick="javascript:return CheckForm();"
                        Width="61px" />
                </td>
            </tr>
        </table>
        <table>
            <tr>
                <td style="height: 22px">
                    <uc1:DbPageFlip ID="DbPageFlip1" runat="server" />
                </td>
                <td style="height: 22px">
                    <input id="but1" type="button" class="button_bg4" value="全选" onclick="javascript:SelectAll();"
                        style="width: 71px" />
                </td>
                <td style="height: 22px; width: 49px;">
                    <input id="but2" type="button" class="button_bg4" value="清空" onclick="javascript:ClearAll();"
                        style="width: 71px" />
                </td>
                <td style="height: 22px">
                    <input id="but3" type="button" class="button_bg4" value="反选" onclick="javascript:CheckOthers();"
                        style="width: 71px" />
                </td>
                <td style="height: 22px">
                    <input id="Submit1" name="submitSave" type="submit" value="确定配送" class="button_bg6"
                        onclick="javascript:return checkValue(1);" style="width: 89px" />
                </td>
            </tr>
        </table>
        <div align="center">
            <asp:Label ID="Lablist" runat="server"></asp:Label><br />
            <asp:GridView ID="gvList" runat="server" Visible="False">
            </asp:GridView>
        </div>
    </div>
    <div id="popup" class="transparent" style="z-index: 200">
        <table border="0" cellpadding="0" style="font-size: x-small">
            <tr>
                <td align="middle" bgcolor="#3366ff">
                    <font color="white">详情</font>
                </td>
            </tr>
            <tr>
                <td id="td1">
                </td>
            </tr>
            <tr>
                <td id="td2">
                </td>
            </tr>
            <tr>
                <td id="td3">
                </td>
            </tr>
            <tr>
                <td id="td4">
                </td>
            </tr>
            <tr>
                <td id="td5">
                </td>
            </tr>
            <tr>
                <td id="td6">
                </td>
            </tr>
        </table>
    </div>
    <div style="display:<%=Showout%>">

        <script type="text/javascript">Memsshow('到期未送货', '共：<%=Qdataoutflow %> 笔 ')</script>

    </div>
</asp:Content>
